package com.sims.action.manager;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.Student;
import com.sims.bean.Teacher;
import com.sims.service.ManagerService;
import com.sims.util.ActionEnhanced;
import com.sims.util.Constant;

public class FindTeacherAction extends ActionEnhanced{
	private List<Teacher> teachers;
	@Autowired
	private ManagerService managerService;

	public List<Teacher> getTeachers() {
		return teachers;
	}
	public void setTeachers(List<Teacher> teachers) {
		this.teachers = teachers;
	}

	@Override
	public String execute() {
		result = managerService.findTeacher(teachers);
		if (result.containsKey(Constant.SUCCESS)) {
			return SUCCESS;
		}
		return ERROR;
	}
}
